#import "KaleidoscopeWondermentController.h"
        
#import "KaleidoscopeWondermentModel.h"
#import "KaleidoscopeWondermentCell.h"
#import "Masonry.h"

@interface KaleidoscopeWondermentController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *journeyXenialTableView;
@property (nonatomic, strong) NSMutableArray *glimmerArr;

@end

@implementation KaleidoscopeWondermentController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self quirkSetupview];
	[self radianceZestfulloadData];
}


- (UITableView *)figHandleTableView {
    if (!_journeyXenialTableView) {
        _journeyXenialTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
        _journeyXenialTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
        _journeyXenialTableView.estimatedRowHeight = 0;
        _journeyXenialTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _journeyXenialTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
        _journeyXenialTableView.delegate = self;
        _journeyXenialTableView.dataSource = self;
        _journeyXenialTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
        _journeyXenialTableView.showsVerticalScrollIndicator = NO;
        _journeyXenialTableView.showsHorizontalScrollIndicator = NO;
        _journeyXenialTableView.backgroundColor = UIColor.clearColor;
    }
    return _journeyXenialTableView;
}

//: 懒加载数据模型数组
- (NSMutableArray *)glimmerArr {
	if (!_glimmerArr) {
		_glimmerArr = [NSMutableArray array];
	}
	return _glimmerArr;
}

//: 初始化页面UI
- (void)quirkSetupview {

	[self.view addSubview:self.journeyXenialTableView];
	[self.journeyXenialTableView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.leading.trailing.equalTo(self.view);
		make.top.equalTo(self.view);
		make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
	}];
}


//: 获取数据模型
- (void)radianceZestfulloadData {
	
}

#pragma mark - UITableView DataSource 
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.glimmerArr.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    KaleidoscopeWondermentCell *quench = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([KaleidoscopeWondermentCell class])];
    if (quench == nil) {
        quench = [[KaleidoscopeWondermentCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([KaleidoscopeWondermentCell class])];
    }
    quench.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return quench;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
